package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.Statistics_chargeDto;
import edu.suda.xsap.dto.Statistics_customerDto;
import edu.suda.xsap.entity.Statistics_charge;
import edu.suda.xsap.entity.Statistics_customer;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface Statistics_customerConvert {

    @Mapping(source="count", target = "count")
    @Mapping(source="year", target = "year")
    @Mapping(source="month", target = "month")
    @Mapping(source="quarter", target = "quarter")
    Statistics_customerDto toDto(Statistics_customer statistics_customer);

    List<Statistics_customerDto> toDtoList(List<Statistics_customer> statisticsCustomer);
}
